package host;

import handler.ServiceHandler;

import com.gmail.dengtao.joe.transport.SocketAcceptor;
public class ServiceHost {

	public static void main(String[] args) throws Exception {
		
		 String host = "172.17.41.181";
		 int port = 8088;
		
		 SocketAcceptor acceptor = new SocketAcceptor(host, port);
			
		
		// sometimes, you should init before...
		acceptor.init();		
		// Custom setting...
		acceptor.setSelectTimeout(10000);
		acceptor.setSendBufferSize(1024);
		acceptor.setReceiveBufferSize(1024);
		
		// Inject the biz handler.
		acceptor.setHandler(new ServiceHandler());
		
		// Start service
		// Thread will be blocked in here.
		acceptor.start();
	}

}
